package com.shawn.springboot.integeration.common.config.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author shawn
 * @description: JWTToken 可以看作 Shiro 用户名密码的载体
 * @date 2023/12/17
 */
public class JWTToken implements AuthenticationToken {
    private static final long serialVersionUID = 1L;
    // 密钥
    private String token;

    public JWTToken(String token) {
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
